package com.zhuanzhuan.youpin.entity;

import java.io.Serializable;

/**
 * 
 * FailedMsg ORM Model实体<br>
 * table：failed_msg
 * 
 * @author zhuanzhuan.youpin.rd
 * @version 2018-06-13 16:47:01
 * @since JDK 1.6 or higher
 */
public class FailedMsg implements Serializable {
    /**
     * 主键id<br>
     * column : failed_msg.id
     */
    private Long id;

    /**
     * topic|tags<br>
     * column : failed_msg.topic_and_tags
     */
    private String topicAndTags;

    /**
     * msg body md5 hash<br>
     * column : failed_msg.body_hash
     */
    private String bodyHash;

    /**
     * msg keys<br>
     * column : failed_msg.msgkeys
     */
    private String msgkeys;

    /**
     * 消息body json<br>
     * column : failed_msg.body
     */
    private String body;

    /**
     * 状态0:失败、1:成功状态0:失败、1:成功<br>
     * column : failed_msg.status
     */
    private Short status;

    /**
     * 拓展字段<br>
     * column : failed_msg.expand
     */
    private String expand;

    /**
     * 已处理次数<br>
     * column : failed_msg.times
     */
    private Integer times;

    /**
     * 创建时间<br>
     * column : failed_msg.create_time
     */
    private Long createTime;

    /**
     * 更新时间<br>
     * column : failed_msg.update_time
     */
    private Long updateTime;

    private static final long serialVersionUID = 1L;

    public FailedMsg() {
        super();
    }

    public FailedMsg(Long id, String topicAndTags, String bodyHash, String msgkeys, String body, Short status, String expand, Integer times, Long createTime, Long updateTime) {
        this.id = id;
        this.topicAndTags = topicAndTags;
        this.bodyHash = bodyHash;
        this.msgkeys = msgkeys;
        this.body = body;
        this.status = status;
        this.expand = expand;
        this.times = times;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    /**
     * 获取 failed_msg.id：主键id
     *
     * @return Long
     */
    public Long getId() {
        return id;
    }

    /**
     * 设置 failed_msg.id：主键id
     *
     * @param id
     * @return this
     */
    public FailedMsg setId(Long id) {
        this.id = id;
        return this;
    }

    /**
     * 获取 failed_msg.topic_and_tags：topic|tags
     *
     * @return String
     */
    public String getTopicAndTags() {
        return topicAndTags;
    }

    /**
     * 设置 failed_msg.topic_and_tags：topic|tags
     *
     * @param topicAndTags
     * @return this
     */
    public FailedMsg setTopicAndTags(String topicAndTags) {
        this.topicAndTags = topicAndTags == null ? null : topicAndTags.trim();
        return this;
    }

    /**
     * 获取 failed_msg.body_hash：msg body md5 hash
     *
     * @return String
     */
    public String getBodyHash() {
        return bodyHash;
    }

    /**
     * 设置 failed_msg.body_hash：msg body md5 hash
     *
     * @param bodyHash
     * @return this
     */
    public FailedMsg setBodyHash(String bodyHash) {
        this.bodyHash = bodyHash == null ? null : bodyHash.trim();
        return this;
    }

    /**
     * 获取 failed_msg.keys：msg keys
     *
     * @return String
     */
    public String getMsgkeys() {
        return msgkeys;
    }

    /**
     * 设置 failed_msg.keys：msg keys
     *
     * @param keys
     * @return this
     */
    public FailedMsg setMsgkeys(String msgkeys) {
        this.msgkeys = msgkeys == null ? null : msgkeys.trim();
        return this;
    }

    /**
     * 获取 failed_msg.body：消息body json
     *
     * @return String
     */
    public String getBody() {
        return body;
    }

    /**
     * 设置 failed_msg.body：消息body json
     *
     * @param body
     * @return this
     */
    public FailedMsg setBody(String body) {
        this.body = body == null ? null : body.trim();
        return this;
    }

    /**
     * 获取 failed_msg.status：状态0:失败、1:成功状态0:失败、1:成功
     *
     * @return Short
     */
    public Short getStatus() {
        return status;
    }

    /**
     * 设置 failed_msg.status：状态0:失败、1:成功状态0:失败、1:成功
     *
     * @param status
     * @return this
     */
    public FailedMsg setStatus(Short status) {
        this.status = status;
        return this;
    }

    /**
     * 获取 failed_msg.expand：拓展字段
     *
     * @return String
     */
    public String getExpand() {
        return expand;
    }

    /**
     * 设置 failed_msg.expand：拓展字段
     *
     * @param expand
     * @return this
     */
    public FailedMsg setExpand(String expand) {
        this.expand = expand == null ? null : expand.trim();
        return this;
    }

    /**
     * 获取 failed_msg.times：已处理次数
     *
     * @return Integer
     */
    public Integer getTimes() {
        return times;
    }

    /**
     * 设置 failed_msg.times：已处理次数
     *
     * @param times
     * @return this
     */
    public FailedMsg setTimes(Integer times) {
        this.times = times;
        return this;
    }

    /**
     * 获取 failed_msg.create_time：创建时间
     *
     * @return Long
     */
    public Long getCreateTime() {
        return createTime;
    }

    /**
     * 设置 failed_msg.create_time：创建时间
     *
     * @param createTime
     * @return this
     */
    public FailedMsg setCreateTime(Long createTime) {
        this.createTime = createTime;
        return this;
    }

    /**
     * 获取 failed_msg.update_time：更新时间
     *
     * @return Long
     */
    public Long getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置 failed_msg.update_time：更新时间
     *
     * @param updateTime
     * @return this
     */
    public FailedMsg setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
        return this;
    }

    /**
     *
     * @param that
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FailedMsg other = (FailedMsg) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTopicAndTags() == null ? other.getTopicAndTags() == null : this.getTopicAndTags().equals(other.getTopicAndTags()))
            && (this.getBodyHash() == null ? other.getBodyHash() == null : this.getBodyHash().equals(other.getBodyHash()))
            && (this.getMsgkeys() == null ? other.getMsgkeys() == null : this.getMsgkeys().equals(other.getMsgkeys()))
            && (this.getBody() == null ? other.getBody() == null : this.getBody().equals(other.getBody()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getExpand() == null ? other.getExpand() == null : this.getExpand().equals(other.getExpand()))
            && (this.getTimes() == null ? other.getTimes() == null : this.getTimes().equals(other.getTimes()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    /**
     *
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTopicAndTags() == null) ? 0 : getTopicAndTags().hashCode());
        result = prime * result + ((getBodyHash() == null) ? 0 : getBodyHash().hashCode());
        result = prime * result + ((getMsgkeys() == null) ? 0 : getMsgkeys().hashCode());
        result = prime * result + ((getBody() == null) ? 0 : getBody().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getExpand() == null) ? 0 : getExpand().hashCode());
        result = prime * result + ((getTimes() == null) ? 0 : getTimes().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    /**
     *
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("[");
        sb.append("id=").append(id);
        sb.append(", topicAndTags=").append(topicAndTags);
        sb.append(", bodyHash=").append(bodyHash);
        sb.append(", msgkeys=").append(msgkeys);
        sb.append(", body=").append(body);
        sb.append(", status=").append(status);
        sb.append(", expand=").append(expand);
        sb.append(", times=").append(times);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append("]");
        return sb.toString();
    }
}